OTRcvConnect
Reads the status of an outstanding or completed asynchronous call to theOTConnect
function.C INTERFACE
OSStatus OTRcvConnect(EndpointRef ref, Tcall* call);C++ INTERFACE
OSStatus TEndpoint::RcvConnect(TCall* call);PARAMETERS
ref
- The endpoint reference of the endpoint initiating the connection.
call
- A pointer to a
TCall
structure (page 3-62) that contains information about the newly established connection. When theOTRcvConnect
function returns, it fills in this structure. You can set this parameter tonil
, in which case no information is returned to you.DESCRIPTION
You call theOTRcvConnect
function to determine the status of a previously issuedOTConnect
call. If you want to retrieve information about the connection, you must allocate buffers for theaddr
field and, if required, theopt
andudata
fields before you make the call.If the endpoint is synchronous and blocking, the
OTRcvConnect
function waits for the connection to be accepted or rejected. If the connection is accepted, the function returns with akOTNoError
result. If the connection is rejected, the function returns with akOTLookErr
result. In this case, you should call theOTLook
function to verify that aT_DISCONNECT
event is the reason for thekOTLookErr
, and then you should call theOTRcvDisconnect
function to clear
the event.If the endpoint is asynchronous or nonblocking, the
OTRcvConnect
function returns with thekOTNoDataErr
result if the connection has not yet been established.VALID STATES
T_OUTCON
SEE ALSO
You use theOTConnect
function (page 3-121) to request a connection request.You use the
TCall
structure (page 3-62) to store information about the newly established connection.You use the
OTLook
function (page 3-85) to retrieve pending asynchronous events.You use the
OTRcvDisconnect
function (page 3-151) to acknowledge that your request for a connection has been rejected.For information on how to use this function with a TCP/IP protocol, see page 8-17 in the TCP/IP chapter.
For information on how to use this function with AppleTalk protocols, see page 13-10 in the ADSP chapter and page 15-10 in the PAP chapter.
You examine the
connect
field of theTEndpointInfo
structure (page 3-48) to determine whether your endpoint supports the sending of data with a connection request.